package com.skyworthclub.competition.beans.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * @author li
 * @version 1.0
 * @since 18-10-15 下午9:49
 * User注册数据传输对象
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserRegisterDto {

    @NotEmpty
    @Size(min = 2, max = 16, message = "2-16位字母或数字")
    private String username;

    @NotEmpty
    @Size(min = 6, max = 16, message = "6-16位字符")
    private String password;


    @NotEmpty
    @Size(min = 6, max = 16, message = "6-16位字符")
    private String repeatPassword;

    @NotEmpty
    @Email(message = "邮箱格式不正确")
    private String email;

    @NotEmpty
    @Size(min = 6, max = 6, message = "验证码长度不正确")
    private String validationCode;


}
